package me.xiaosiqi.syt.cmn.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import me.xiaosiqi.syt.cmn.service.DictService;
import me.xiaosiqi.syt.vo.cmn.DictEeVo;

/**
 * @author: xiaosiqi
 * @date:2022/7/30 20:38
 */
public class DictImportListener extends AnalysisEventListener<DictEeVo> {

    private DictService dictService;

    public DictImportListener(DictService dictService) {
        this.dictService = dictService;
    }

    @Override
    public void invoke(DictEeVo dictEeVo, AnalysisContext analysisContext) {
        dictService.saveDictEeVo(dictEeVo);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
